package com.loong.order.common.forehead.param;

import com.loong.common.validator.group.CommonInsert;
import com.loong.common.validator.group.CommonUpdate;
import lombok.*;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Description: 订单详情参数
 * @Author: hzp
 * @Date: 2020-12-31 9:42
 */
@Builder
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class OrderItemForeheadParam {
    /**
     * 主键id
     */
    @NotNull(message = "更新时订单详情的id不能为空",groups = {CommonUpdate.class})
    private Long id;

    /**
     * 规格信息
     */
    private String specificationInfo;

    /**
     * 商品id
     */
    @NotNull(message = "新增时商品的id不能为空",groups = {CommonInsert.class})
    private Long goodsSkuId;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 商品购买数量
     */
    @NotNull(message = "新增时商品购买数量不能为空",groups = {CommonInsert.class})
    private Integer num;

    /**
     * 商品名称
     */
    @NotBlank(message = "新增时商品名称不能为空",groups = {CommonInsert.class})
    private String goodsName;

    /**
     * 商品单价
     */
    @NotNull(message = "新增时商品单价不能为空",groups = {CommonInsert.class})
    private BigDecimal price;

    /**
     * 商品总金额
     */
    @NotNull(message = "新增时商品总金额不能为空",groups = {CommonInsert.class})
    private BigDecimal totalPrice;

    /**
     * 商品图片地址
     */
    @NotBlank(message = "新增时商品图片地址不能为空",groups = {CommonInsert.class})
    private String picturePath;
}
